#ifndef _OTA_TASK_H_
#define _OTA_TASK_H_


#define MODEL_MAX_LEN        30
#define VERSION_MAX_LEN      30
#define MODEL               "pmk-wifi"
#define LOCAL_VERSION       "0.2.2"

#define MODEL_STC           "pmk-ccj-zk"
#define NULL_VERSION_STC    "0.0.0"        //空版本

#define OTA_START_BIT           BIT0            //ota启动
#define OTA_FINISH_BIT          BIT1            //ota完成
#define OTA_ERROR_BIT           BIT2            //ota错误
#define OTA_STC_START_BIT       BIT3            //stc升级启动
#define OTA_STC_FINISH_BIT      BIT4            //stc升级完成
#define OTA_STC_DOWLOAD_BIT     BIT5            //stc升级下载
#define OTA_EXIT_BIT            BIT6            //退出ota

typedef enum
{
    GET_VERSION = 0,        //获取stc版本
    CHECK_VERSION,          //检查是否获取成功
    SET_BOOTLOADER,         //stc进入bootloader
    GET_BIN,                //下载bin固件
}StcUpdateState_t;          //stc升级过程的状态

extern EventGroupHandle_t OTAEventGroup;
void OTA_Task(void *param);

extern bool isMyUpdate;
extern bool GetVersionSuccess;

#endif